package OneDay;

import java.util.Scanner;

public class LianXi5 {
    public static void main(String[] args) {
        int a;
        System.out.printf("通过键盘输入任意一个整数，我将进行和计算");
        Scanner scanner = new Scanner(System.in);
        a= scanner.nextInt();
        System.out.printf("之后");
        int res=a/1000+a%1000/100+a%1000%100/10+a%1000%100%10;
        System.out.println("res = " + res);
    }
}
